package com.hycat.mail.thirdpart.controller;

import com.hycat.mail.common.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.io.InputStream;

/**
 * @author : lzhycat
 * @date : 2022-08-10 17:37
 */
public class OssController {



/*    *//**
     * 上传图片至阿里云
     *//*
    @PostMapping("/upload/{module}")
    public R onLoad(@RequestParam("file") MultipartFile file,
                    @RequestParam("module")  @PathVariable String module) throws IOException {
        InputStream inputStream = file.getInputStream();
        String originalFilename = file.getOriginalFilename();

        String url = ossService.onload(inputStream, originalFilename, module);

        return R.ok().put("url",url);
    }*/
}
